-
Notifications
You must be signed in to change notification settings - Fork 824
Add MCUBOOT_CHECK_HEADER_LOAD_ADDRESS #2481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
} | ||
|
||
#if MCUBOOT_IMAGE_NUMBER > 1 && !defined(MCUBOOT_ENC_IMAGES) && defined(MCUBOOT_VERIFY_IMG_ADDRESS) | ||
#if defined(MCUBOOT_VERIFY_IMG_ADDRESS) && !defined(MCUBOOT_ENC_IMAGES) || \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing bracket here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is. I am still testing this locally and trying to make it run with sim.
#else | ||
/* This is platform specific code that should not be here */ | ||
const uint32_t offset = secondary_hdr->ih_hdr_size + RESET_OFFSET; | ||
BOOT_LOG_DBG("Getting image %d internal addr from offset %u", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would mark this as deprecated then remove it in 2 releases
b9f0b09
to
f810c82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adding MCUBOOT_CHECK_HEADER_LOAD_ADDRESS that allows to verify header stored ih_load_addr against target boot slot, to allow MCUboot to reject firmware uploaded for incorrect slot. This option works with encrypted software, as it does not require decrypting image. This option takes precedence over MCUBOOT_VERIFY_IMG_ADDRESS. Note that the change leaves MCUBOOT_VERIFY_IMG_ADDRESS with the bug reported here mcu-tools#2473. This commit also removes dependency on having more then one image to have the check enabled, as it makes no point to block using it on single image. Co-authored-by: Andrzej Puzdrowski <[email protected]> Signed-off-by: Dominik Ermel <[email protected]>
Allows to enable MCUboot config MCUBOOT_CHECK_HEADER_LOAD_ADDRESS. Co-authored-by: Andrzej Puzdrowski <[email protected]> Signed-off-by: Dominik Ermel <[email protected]>
Add ImageManipulation parameter to the function to allow creating images broken in various ways. Signed-off-by: Dominik Ermel <[email protected]>
Testing MCUBOOT_CHECK_HEADER_LOAD_ADDRESS for non-RAM load binaries. Signed-off-by: Dominik Ermel <[email protected]>
Please use MCUBOOT_CHECK_HEADER_LOAD_ADDRESS instead. Signed-off-by: Dominik Ermel <[email protected]>
Add MCUBOOT_CHECK_HEADER_LOAD_ADDRESS that allows to validate application image, against boot slot, with the use of ih_img_addr from header.
There are additional commits here: